package cn.dw.dao;

import java.io.Serializable;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;

import cn.dw.utils.ConditionType;
import cn.dw.utils.PagerModel;

public abstract interface GenericDAO<T>
  extends Serializable
{
  public abstract Criteria createCriteria();
  
  public abstract Criteria createCriteria(Criterion... paramVarArgs);
  
  public abstract Criteria createCriteria(List<ConditionType> paramList);
  
  public abstract int count();
  
  public abstract int count(ConditionType paramConditionType);
  
  public abstract int count(List<ConditionType> paramList);
  
  public abstract T find(Serializable paramSerializable);
  
  public abstract T findUniqueByProperty(String[] paramArrayOfString, Object[] paramArrayOfObject);
  
  public abstract List<T> find(ConditionType paramConditionType);
  
  public abstract List<T> find(List<ConditionType> paramList);
  
  public abstract List<T> find(List<ConditionType> paramList, List<Order> paramList1);
  
  public abstract T findUniqueByProperty(String paramString, Object paramObject);
  
  public abstract void merge(Object paramObject);
  
  public abstract void modify(Object paramObject);
  
  public abstract Serializable save(Object paramObject);
  
  public abstract void saveOrUpdate(Object paramObject);
  
  public abstract void remove(Object paramObject);
  
  public abstract List<T> findAll();
  
  public abstract void removeAll();
  
  public abstract PagerModel findByPager(int paramInt1, int paramInt2);
  
  public abstract PagerModel findByPager(ConditionType paramConditionType, int paramInt1, int paramInt2);
  
  public abstract PagerModel findByPager(List<ConditionType> paramList, int paramInt1, int paramInt2);
  
  public abstract PagerModel findByPager(List<ConditionType> paramList, List<Order> paramList1, int paramInt1, int paramInt2);
}
